@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600&display=swap');

:root {
  /* SCREEN SIZE */
  --screen-mobile: 375px;
  --screen-desktop: 1440px;

  /* PRIMARY */
  --red: hsl(0, 78%, 62%);
  --cyan: hsl(180, 62%, 55%);
  --orange: hsl(34, 97%, 64%);
  --blue: hsl(212, 86%, 64%);

  /* NEUTRAL */
  --grayish-blue: hsl(229, 6%, 66%);
  --very-dark-blue: hsl(234, 12%, 34%);
  --very-light-gray: hsl(0, 0%, 98%);

  --card-margin: 15px;
}

* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  padding: 0;
  margin: 0;
}

body {
  font-size: 15px;
  background-color: var(--very-light-gray);
}

header {
  max-width: 500px;
  text-align: center;
  margin: 3.5rem auto;
}

header > p {
  font-size: 14px;
}

header > h1 {
  margin-bottom: 1rem;
  font-weight: 200;
}

header > h1 > .strong {
  font-weight: 600;
}

p {
  color: var(--grayish-blue);
}

.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1140px;
  margin: auto;
  justify-content: center;
}

.card.red::before { border-color: var(--red); }
.card.cyan::before { border-color: var(--cyan); }
.card.orange::before { border-color: var(--orange); }
.card.blue::before { border-color: var(--blue); }

.card.red::after { background-color: var(--red); }
.card.cyan::after { background-color: var(--cyan); }
.card.orange::after { background-color: var(--orange); }
.card.blue::after { background-color: var(--blue); }

.card {
  padding: 30px;
  height: 250px;
  width: 350px;
  background-color: white;
  margin: var(--card-margin);
  border-radius: 5px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 5%), 0 6px 6px rgba(0, 0, 0, 10%);
  transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card::before {
  position: absolute;
  top: 0;
  left: 0;
  border-top: 10px solid;
  content: "";
  width: 100%;
}

.card::after {
  position: absolute;
  top: -4.5rem;
  right: -3rem;
  width: 100px;
  height: 100px;
  content: "";
  background-color: antiquewhite;
  border-radius: 50%;
}

.card:hover {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

.card > img {
  margin: auto 0 0 auto;
}

@media only screen and (min-width: 1140px) {
  .card:first-child, .card:last-child {
    transform: translateY(calc(50% +  var(--card-margin)));
  }

  .card.orange {
    order: 1;
  }
}

.attribution {
  font-size: 11px;
  text-align: center;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}
